using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace SQL2005_Service_Manager
{
	static class Program
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main()
		{
            bool freeToRun;

            //want only 1 copy of the application to be able to run at any time
            string safeName = "Local\\wwwsqldbatipscomSQL2005ServiceManagerMutex";
            using (System.Threading.Mutex m = new System.Threading.Mutex(true, safeName, out freeToRun))
            {
                if (freeToRun)
                {
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);
                    Application.Run(new MainForm());
                }
                else
                {
                    Application.Exit();
                }
            } 
		}
	}
}